/*
 * @(#)MessageDispatchStatus.java $version 2012. 6. 18.
 *
 * Copyright 2007 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.nhncorp.echo.hangame.batch.sms.model;

import java.util.HashMap;
import java.util.Map;

/**
 * @author hs
 */
public enum MexSmsSendResultType {
	REQEUST_COMPLETE("SMST001", "발송 요청 완료"), REQUEST_FAIL("SMST002", "발송 요청 실패"), REQUEST_FAIL_BY_FILTER("SMST003", "발송 요청 실패"), SEND_COMPLETE("SMST004", "발송완료"), POWER_OFF("SMST005", "휴대폰 꺼짐"), WRONG_NUMBER("SMST006", "잘못된 번호"), SPAM("SMST007", "통신사로부터 스팸처리"), ETC_ERROR("SMST009", "기타오류"), INNER_CLOSE("SMST012", "내부종료");

	private static final Map<String, MexSmsSendResultType> MAP;
	private String code;

	private MexSmsSendResultType(String code, String title) {
		this.code = code;
	}
	
	static {
		MAP = new HashMap<String, MexSmsSendResultType>();

		for (MexSmsSendResultType type : values()) {
			MAP.put(type.code, type);
		}
	}

	public static MexSmsSendResultType fromCode(String code) {
		return MAP.get(code);
	}

	public String getCode() {
		return code;
	}

}
